function NewFile=GetRandName(OldName,NewExt)

[pathstr,name,ext]=fileparts(OldName);
type='date';
mode='yyyymmddHHMMSS';

switch type
    case 'date'
        suffix=datestr(now,mode);
    case 'rand'
        letter=['0':'9','A':'Z','a':'z'];
        idx=randi([1 62],[1 8]);
        suffix=letter(idx);
end
NewName=[name,'_',suffix,NewExt];
NewFile=fullfile(pathstr,NewName);